home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / f1 / bloques.arj / BLOQUES7.TXT < prev    next >
Encoding:
Text File  |  1992-05-18  |  17.4 KB  |  295 lines

  1.  
  2. '  I N I C I O
  3.  
  4.  
  5. 10  COMMON COMIENZO,DERECHA$,IZQUIERDA$,DISPARO$,PARAR$
  6.     IF COMIENZO<>100 THEN SYSTEM
  7.     DEFINT A-Z:SCREEN 1,0:COLOR 0,1:KEY OFF:CLS
  8.  
  9. 121 CIRCLE(3,3),2,2:PAINT STEP(0,0),2:GET(0,0)-(5,5),BALL:FILA%=0:PANT%=0:PUNTOS&=0:PUNTOT&=20000:puntot2&=0:restore 5000:cls
  10.  
  11. '  P R O G R A M A   P R I N C I P A L
  12.  
  13. 130 def seg=&hb800:bload"ladrillo.bas"
  14.     key 15,chr$(&03)+chr$(1):on key(15) gosub 4700:KEY(15) ON
  15.     for oc2=0 to timer-int(timer/100)*100:x=rnd(1):next oc2
  16.     get(80,42)-(100,50),PISO:line (85,47)-step(10,3),2,bf:get(0,0)-(1,3),bala
  17.     dim PISO(100),CUADRO(100),CUADRO2(100),RAYO(200),palap(200),palag(200),terreno(4000),disparo(200),nivel(200)
  18.     get(85,47)-(95,50),CUADRO:line (85,42)-step(10,8),1,bf:get(85,42)-(95,50),CUADRO2
  19.     put (80,42),PISO,pset:put(85,42),CUADRO2,pset:get(268,29)-(301,33),palap:get(268,52)-(301,56),palag
  20.     get(70,18)-(250,189),terreno:get(268,95)-(301,102),disparo:get (268,118)-(301,102),rayo
  21.     n=8:put (310,23),ball,xor:oc2=1:num$="111111122222233333444455666777777778"
  22.     GET (268,118)-(301,123),RAYO
  23.     A=3:gosub 4500
  24. 140 on timer(n) gosub 4200:if pant%<>0 then put(70,18),terreno,pset
  25.     NBRKS=100:PANT%=PANT%+1:GOSUB 950
  26.     READ TE$:A=0:a2$="":FOR j=0 TO 9:FOR i=0 TO 9:j2=i:a=A+1:A2$=MID$(TE$,A,1):if a2$="-" then nbrks=nbrks-abs(10-i):i=10:goto 145
  27.     if a2$="+" then for j2=i to 9:gosub 143:next j2:i=10:goto 145
  28.     A2=VAL(A2$):gosub 143:goto 145
  29. 143 if a2=2 or a2=0 then nbrks=nbrks-1
  30.     LINE(81+16*j2,(60+J*8))-STEP(14,6),A2,BF:return
  31. 145 NEXT i:NEXT j:repe=1:for i=1 to 3:pierde%(i)=1:tiro%(i)=54:muerto1(i)=1:muerto2(i)=1:next
  32.     w=1:repe=1:PX=144:PXINC=0:CUCH%=80:tocado=0:tib2=0:dis=2:pala%=20:tiro%=180:pauta=0:disp=0:palapg=0:primera=0
  33. 170 final%=3000-((nivel-1)*1000):REM MODIFICAR EL NUMERO 3000 SI SE QUIERE AUMENTAR O DISMINUIR LA VELOCIDAD DE LA PELOTA
  34. 171 GOSUB 900:GOSUB 800:GOSUB 700
  35. 184 IF INKEY$<>"" THEN GOTO 184
  36. 190 w=w+1:if w>repe then w=1
  37. 191 IF demo=1 THEN GOSUB 4600
  38.     A$=INKEy$:IF A$=DERECHA$ THEN PXINC=5 ELSE IF A$=IZQUIERDA$ THEN PXINC=-5  else if a$=PARAR$ then PXINC=0
  39.     if disp=1 and demo=1 then a$=DISPARO$
  40.     if a$=chr$(27) and demo=1 then demo=0:get(72+(45*3),2)-(114+(45*3),16),nivel:put(72+(45*3),2),nivel,preset
  41.     OLDPX=PX:PX=PX+PXINC
  42.     IF PASOPANT=1 THEN PUT(99,26),RAYO,XOR:PUT(189,26),RAYO,XOR
  43.     IF PX-dis<75 OR PX+dis>211 THEN PX=OLDPX
  44.     IF tiro%(1)=<174 AND tiro%(1)=>58 THEN GOSUB 4110
  45.     IF DISP=1 THEN DIS=2:PUT(OLDPX,179),DISPARO:PUT(PX,179),DISPARO:OLDPX=PX:GOTO 200
  46.     if pala%=20 then dis=2:put(OLDPX,182),palap:put(PX,182),palap:oldpx=px
  47.     if pala%=30 then dis=0:put(oldpx,182),palag:put(px,182),palag:oldpx=px
  48. 200 if tocado=2 then timer off else timer on
  49.     gosub 1000
  50.     OLDBX(W)=BX(W):BX(W)=BX(W)+BXINC(W)
  51.     iF BX(W)<79 or bx(w)=>234 THEN bxinc(w)=-bxinc(w):BX(W)=BX(W)+2*BXINC(W):SOUND 1000,.2
  52.     if bx(w)<>oldbx(w) then goto 203 else if bx(w)<234 then goto 201 else bxinc(w)=-4
  53. 201 bx(w)=bx(w)+2+bxinc(w):pared=0
  54. 203 OLDBY(W)=BY(W):BY(W)=BY(W)+BYINC(W):if by(w)<32 and pasopant=1 then gosub 4400
  55.     if BY(W)<32 THEN BYINC(W)=-BYINC(W):BY(W)=BY(W)+2*BYINC(W):if repe=<1 then SOUND 1000,.2
  56.     by2=by(w)
  57.     IF BY(W)<180 THEN goto 247 else if by(w)>186 then goto 280
  58. 245 IF BX(W)+3<pX+dis OR BX(W)>px+33-dis THEN GOTO 247
  59.     IF PALAPG=1 AND BYINC(W)=1 THEN GOSUB 1000
  60. 246 BYINC(W)=-BYINC(W):BY(W)=BY(W)+2*BYINC(W):BXINC(W)=(BX(W)-(PX+dis))\2-4:SOUND 75,.2
  61. 247 put(OLDBX(W),OLDBY(W)),BALL:gosub 4005:if PINTA%=0 THEN GOTO 260
  62.     if (PINTA%=1) and (BY(W)<=50 and BY(W)>=38) then BYINC(W)=-BYINC(W):BY(W)=BY(W)+2*BYINC(W):sound 1000,.2 ELSE GOTO 251
  63.     if sgn(BYINC(W))=1 THEN FINAL%=FINAL%-200:if TOCADO=2 then goto 258 else TOCADO=1:goto 260 else 260
  64. 251 if (PINTA%=3) and (BY(W)<=50 and BY(W)>=36) then_
  65.     IF TOCADO=0 AND REPE<3 and sgn(BYINC(W))=1 and w=repe and sola=0 THEN REPE=REPE+1:final%=final%-1100:gosub 4301:play"mbl32n1abc":bol=2:goto 258 ELSE if sola=1 and sgn(byinc(w))=1 then sola=0:byinc(w)=-byinc(w):goto 258 else goto 258
  66.     if tocado=0 and repe=3 and by(1)<50 and by(2)<50 and by(3)<50 then sola=1
  67.     IF PINTA%=2 then if by(w)>=50 THEN sound 100,.9:final%=final%-25:toq=toq+1:goto 258 else 258
  68.     GOSUB 4000:if disp=1 and tib2>0 then gosub 4001
  69.     if PINTA%=1 THEN PAINT(BX(W)+p1,BY2+p2),3,0:sound 12000,.9:GOTO 253
  70.     PAINT(BX(W)+p1,BY2+p2),0:SOUND 175,.9:NBRKS=NBRKS-1:GOSUB 800
  71. 253 gosub 4000:if disp=1 and tib2>0 then gosub 4001
  72. 254 PUNTOS&=PUNTOS&+(Pinta%*5):GOSUB 700
  73. 258 if bol=2 then bol=0:if palapg=1 then gosub 4301
  74.     BYINC(W)=-BYINC(W):BY(W)=BY(W)+2*BYINC(W)
  75. 260 PUT(BX(W),BY(W)),BALL:IF A$=DISPARO$ then if disp=1 and tib2<3 and tiro%(tib2)<140 then tib2=tib2+1:muerto1(tib2)=0:muerto2(tib2)=0:pxt(tib2)=PX:put(pxt(tib2)+7,174),bala,xor:put(pxt(tib2)+26,174),bala,xor:FINAL%=FINAL%-(300*tib2):_
  76.     tiro%(tib2)=174
  77. 261 for espera%=1 to final%:next :if final%<0 then final%=0:goto 190 else goto 190
  78. 280 timer off:SOUND 200,.3:SOUND 75,10
  79.     PUT(OLDBX(W),OLDBY(W)),BALL:if repe>1 then gosub 3000:pierde%(repe)=1:repe=repe-1:final%=final%+1100:if repe=1 then sola=1:GOTO 171 else gosub 4301:goto 171 else nballs=nballs-1:pierde%(1)=1:gosub 4301
  80.     goto 170
  81. 300 IF INKEY$<>"" THEN GOTO 300
  82. 310 A$=INKEY$:IF A$=DISPARO$ THEN for pausa%=1 to 5000:next:CHAIN "BLOCKS.EXE" ELSE GOTO 310
  83. 320 END
  84.  
  85. '  R U T I N A S     D E L    P R O G R A M A
  86.  
  87. '  IMPRESION  DE LOS PUNTOS
  88. 700 IF PUNTOS&>99999 THEN PUNTOS&=0:PUNTOT&=20000:PUNTOT2&=0
  89.     LOCATE 24,3:IF PUNTOS&<10 THEN PRINT USING "0000#";PUNTOS&;:GOTO 720
  90.     IF PUNTOS&<100 THEN PRINT USING "000##";PUNTOS&;:GOTO 720
  91.     IF PUNTOS&<1000 THEN PRINT USING "00###";PUNTOS&;:GOTO 720
  92.     IF PUNTOS&<10000 THEN PRINT USING "0####";PUNTOS&;:GOTO 720
  93.     PRINT USING "#####";PUNTOS&;
  94. 720 IF PUNTOS&=>PUNTOT& THEN PUNTOT2&=PUNTOT2&+20000:PUNTOT&=PUNTOT&+PUNTOT2&:PLAY"MBL64ABCDCBA":nballs=nballs+1:goto 900
  95.     RETURN
  96.  
  97. '  IMPRESION DE LOS BLOQUES
  98. 800 LOCATE 18,4:IF NBRKS<10 THEN PRINT USING"00#";NBRKS:GOTO 820
  99.     IF NBRKS<100 THEN PRINT USING"0##";NBRKS:GOTO 820
  100.     PRINT USING"###";NBRKS
  101. 820  IF NBRKS=0 THEN for PAUSA%=1 to 10000:next:N=N+2:pasopant=0:RETURN 140 ELSE RETURN
  102.  
  103. '  IMPRESION DE NUMERO DE BOLAS
  104. 900 IF NBALLS>9 THEN NBALLS=9:RETURN
  105.     LOCATE 6,5:PRINT USING"#";NBALLS
  106.     IF NBALLS=0 THEN PLAY"N9N7N6N5N4N3N2N1N0":for pausa%=1 to 17000:next:RETURN 300 ELSE RETURN
  107.  
  108. '  IMPRESION DE NUMERO DE PANTALLAS
  109. 950 LOCATE 12,4:IF PANT%<10 THEN PRINT USING"00#";PANT%:GOTO 980
  110.     IF PANT%<100 THEN PRINT USING"0##";PANT%:GOTO 980
  111.     PRINT USING"###";PANT%
  112. 980 RETURN
  113.  
  114. '  MOVIMIENTO PISO,CUADRO Y PALA CON BOLA (AL INICIO)
  115. 1000  if CUCH%=80 then sound 10000,.3:DIR%=1 else if CUCH%=220 then sound 10000,.3:DIR%=2
  116.       if DIR%=1 then CUCH%=CUCH%+2:CC=2:put (CUCH%,42),PISO,pset
  117.       if DIR%=2 then CUCH%=CUCH%-2:CC=-2:put (CUCH%,42),PISO,pset
  118.       if TOCADO=0 then put(CUCH%+5,42),CUADRO2,pset
  119.       if TOCADO=1 then gosub 2000
  120.       if TOCADO=2 then gosub 2010:if NBALLS=0 then RETURN 171
  121. 1001  IF PIERDE%(W)=1 AND A$=PARAR$ THEN PIERDE%(W)=0:pauta=0:primera=0:return 190
  122.       IF PIERDE%(W)=1 and palapg=0 THEN gosub 4010:goto 1002
  123.       if palapg<>1 then return
  124.       IF BY(W)<175 or by(w)=>184 THEN return
  125.       if byinc(w)=-1 then return
  126.       IF BX(W)+3<pX+dis OR BX(W)>px+33-dis THEN return else pauta=0:byinc(w)=-byinc(w)
  127. 1002  pauta=pauta+1:if pauta=>69 then pauta=0:pierde%(w)=0:primera=0:return 190
  128.       if palapg=1 and a$=PARAR$ then primera=0:pauta=0:return
  129.       if demo=1 and pauta=>20 then pauta=70 else if demo=1 then gosub 4600
  130.       for pausa%=1 to final%:next:BXINC(W)=(PXINC-(sgn(PXINC))*sgn(PXINC)):BX2=BX(W):BX(W)=px+12:put(BX2,BY(W)),BALL,xor:put(BX(W),BY(W)),BALL,xor:RETURN 190
  131.  
  132.  
  133. '  MOVIMIENTO DE BAJADA DEL CUADRO
  134. 2000 MOVX=CUCH%+5-CC:MOVY=51:put (MOVX,MOVY),CUADRO,xor:TOCADO=2:final%=final%-200:return 700
  135. 2010 MOVY=MOVY+2:put(MOVX,MOVY-2),CUADRO,xor:put(MOVX,MOVY),CUADRO,xor
  136.      if MOVY<=176 then return
  137.      put(MOVX,MOVY),CUADRO,xor:TOCADO=0:final%=final%+200
  138.      if ((movx>px+dis and movx<px+33+dis) or (movx+10>px+dis and movx+10<px+33+dis)) then play"mbl64ga":gosub 4300:PUNTOS&=PUNTOS&+500:goto 700
  139.      play"mbl32n8n7n6n5n4n3n2n1":return
  140.  
  141. '  CAMBIO DEL VALOR DE LAS PELOTAS CUANDO SE PIERDE UNA DE ELLAS
  142. 3000 for CICLO=W to REPE-1
  143.      BX(w)=BX(CICLO+1):BY(w)=BY(CICLO+1):BXINC(w)=BXINC(CICLO+1):BYINC(w)=BYINC(CICLO+1)
  144.      OLDBX(w)=OLDBX(CICLO+1):OLDBY(w)=OLDBY(CICLO+1):pierde%(w)=0
  145.      NEXT CICLO:pierde%(3)=1
  146. 3010 RETURN
  147.  
  148. '  BORRADO Y REC. DE LAS BOLAS Y CUADRO ANTES DE PINTAR
  149. 4000 for esp=1 to repe:if esp<>w then put(bx(esp),by(esp)),BALL
  150.      NEXT:tib=0:if tocado=2 then put(movx,movy),cuadro,xor
  151.      return
  152. 4001 if tiro%(1)=174 then return
  153.      if tib<>0 then put(bx(w),by(w)),ball,xor
  154.      FOR ESP=1 TO tib2
  155.      if tiro%(esp)=174 or tiro%(esp)=0 then goto 4002
  156.      if tiro%(1)>=168 and tiro%(1)<=54 then goto 4002
  157.      if muerto1(ESP)<>1 and tib<>esp then put(pxt(ESP)+7,tiro%(esp)),bala,xor
  158.      if muerto2(ESP)<>1 and tib<>esp then put(pxt(ESP)+26,TIRO%(esp)),BALA,XOR
  159. 4002 NEXT
  160.      if tib<>0 and tocado=2 then put(movx,movy),cuadro,xor:return else return
  161.  
  162. 4005 pintari%=0:pintard%=0:pintabi%=0:pintabd%=0
  163.      pintari%=point(bx(w)+2,by(w)+2)
  164.      pintard%=point(bx(w)+5,by(w)+2)
  165.      pintabi%=point(bx(w)+2,by(w)+5)
  166.      pintabd%=point(bx(w)+5,by(w)+5)
  167.      if sgn(bxinc(w))=-1 and sgn(byinc(w))=-1 then goto 4006:'arriba izqui.
  168.      if sgn(bxinc(w))=1 and sgn(byinc(w))=-1 then goto 4007:'arriba derech.
  169.      if sgn(bxinc(w))=-1 and sgn(byinc(w))=1 then goto 4008:'abajo izquier.
  170.      if sgn(bxinc(w))=1 and sgn(byinc(w))=1 then goto 4009:'abajo derech.
  171.      goto 4006
  172. 4006 if pintari%=2 and pintabi%=2 then pinta%=2:if pintard%=2 then bxinc(w)=-bxinc(w):goto 4020 else goto 4030
  173.      if ((pintari%=3 or pintari%=1) and (pintabi%=3 or pintabi%=1) and (pintard%=0)) then pinta%=pintabi%:p1=2:p2=5:goto 4030
  174.      if pintari%=2 then pinta%=2:goto 4020
  175.      if pintari%<>0 then pinta%=pintari%:p1=2:p2=2 else pinta%=pintard%:p1=5:p2=2
  176.      return
  177. 4007 if pintard%=2 and pintabd%=2 then pinta%=2:if pintari%=2 then bxinc(w)=-bxinc(w):goto 4020 else goto 4030
  178.      if ((pintard%=3 or pintard%=1) and (pintabd%=3 or pintabd%=1) and (pintari%=0)) then pinta%=pintabd%:p1=5:p2=5:goto 4030
  179.      if pintard%=2 then pinta%=2:goto 4020
  180.      if pintard%<>0 then pinta%=pintard% :p1=5:p2=2 else pinta%=pintari% :p1=2:p2=2
  181.      return
  182. 4008 if pintabi%=2 and pintari%=2 then pinta%=2:if pintabd%=2 then bxinc(w)=-bxinc(w):goto 4020 else goto 4030
  183.      if ((pintabi%=3 or pintabi%=1) and (pintari%=3 or pintari%=1) and (pintabd%=0)) then pinta%=pintari%:p1=2:p2=2:goto 4030
  184.      if pintabi%=2 then pinta%=2:goto 4020
  185.      if pintabi%<>0 then pinta%=pintabi%:p1=2:p2=5 else pinta%=pintabd%:p1=5:p2=5
  186.      return
  187. 4009 if pintabd%=2 and pintard%=2 then pinta%=2:if pintabi%=2 then bxinc(w)=-bxinc(w):goto 4020 else goto 4030
  188.      if ((pintabd%=3 or pintabd%=1) and (pintard%=3 or pintard%=1) and (pintabi%=0)) then pinta%=pintard%:p1=5:p2=2:goto 4030
  189.      if pintabd%=2 then pinta%=2:goto 4020
  190.      if pintabd%<>0 then pinta%=pintabd%:p1=5:p2=5 else pinta%=pintabi%:p1=2:p2=5
  191.      return
  192.  
  193. '    S U B R U T I N A S   D E L   P R O G R A M A
  194.  
  195. '  INICIO DEL VALOR DE X e Y DE LAS BOLAS
  196. 4010 IF Primera=0 THEN primera=1:BX(W)=px+12:by(w)=182-6:bxinc(w)=4:byinc(w)=4:put(BX(W),BY(W)),BALL,xor:return else return
  197. 4020  if toq=>15 and bx(w)>=70 then toq=0:bx(w)=bx(w)+2*bxinc(w):return else return
  198. 4030 if by(w)<=56 then return
  199.      bxinc(w)=-bxinc(w):BYINC(W)=-BYINC(W):BY(W)=BY(W)+2*BYINC(W):return
  200.  
  201.  
  202. '  DISPARO
  203. 4110 if tib2>3 then tib2=3:return
  204.      for tib=1 to tib2
  205.      if tiro%(tib)=<54 then goto 4130
  206.      tiro%(tib)=tiro%(tib)-4:if tiro%(tib)=58 then goto 4120
  207.      IF muerto1(tib)=1 AND muerto2(tib)=1 THEN tiro%(tib)=0:GOTO 4120 ELSE IF muerto1(tib)=1 THEN GOTO 4115
  208.      IF POINT(pxt(tib)+7,tiro%(tib))=3 or POINT(pxt(tib)+7,tiro%(tib))=1 THEN sound 270,.5::gosub 4001:paint(pxt(tib)+7,tiro%(tib)),0:gosub 4001:muerto1(tib)=1:put(pxt(tib)+7,tiro%(tib)+4),bala,xor:puntos&=puntos&+100:_
  209.      GOSUB 700:nbrks=nbrks-1:gosub 800:goto 4115
  210.      IF POINT(pxt(tib)+7,tiro%(tib))=2 THEN put(pxt(tib)+7,tiro%(tib)+4),bala,xor:sound 170,.5:muerto1(tib)=1
  211. 4115 if muerto2(tib)=1 then goto 4117
  212.      IF POINT(pxt(tib)+26,tiro%(tib))=3 OR POINT(pxt(tib)+26,tiro%(tib))=1 THEN sound 270,.5::gosub 4001:PAINT(pxt(tib)+26,tiro%(tib)),0:gosub 4001:muerto2(tib)=1:put(pxt(tib)+26,tiro%(tib)+4),bala,xor:puntos&=puntos&+100:_
  213.      GOSUB 700:nbrks=nbrks-1:gosub 800:goto 4117
  214.      IF POINT(pxt(tib)+26,tiro%(tib))=2 THEN put(pxt(tib)+26,tiro%(tib)+4),bala,xor:sound 170,.5:muerto2(tib)=1
  215. 4117 IF muerto1(tib)=0 AND muerto2(tib)=0 THEN Put(pxt(tib)+7,tiro%(tib)),bala,xor:Put(pxt(tib)+26,tiro%(tib)),bala,xor:Put(pxt(tib)+7,tiro%(tib)+4),bala,xor:Put(pxt(tib)+26,tiro%(tib)+4),bala,xor:GOTO 4120
  216.      IF muerto1(tib)=0 THEN Put(pxt(tib)+7,tiro%(tib)),bala,xor:Put(pxt(tib)+7,tiro%(tib)+4),bala,xor ELSE IF muerto2(tib)=0 THEN Put(pxt(tib)+26,tiro%(tib)),bala,xor:Put(pxt(tib)+26,tiro%(tib)+4),bala,xor
  217. 4120 if tiro%(tib)<>0 and tiro%(tib)<>58 then goto 4130
  218.      SOUND tiro%(tib)+100,.2:if muerto1(tib)=0 then put(pxt(tib)+7,tiro%(tib)+4),bala,xor
  219.      if muerto2(tib)=0 then put(pxt(tib)+26,tiro%(tib)+4),bala,xor
  220.      for CICLO=tib to tib2
  221.      muerto1(ciclo)=muerto1(CICLO+1):muerto2(ciclo)=muerto2(CICLO+1):tiro%(ciclo)=tiro%(ciclo+1):pxt(ciclo)=pxt(CICLO+1)
  222.      NEXT CICLO:final%=final%+(300*tib2):TIB2=TIB2-1:tiro%(ciclo+1)=0
  223. 4130 next:RETURN
  224.  
  225. '  SELECCIONAR OPCION AL AZAR
  226. 4200 tocado=1:oc1=oc2:OC2=INT(1+RND(1)*36)
  227.      oc2=val(mid$(num$,oc2,1))
  228.      IF OC1=OC2 THEN RETURN
  229.      y1=oc1*23:put(310,y1),ball,xor:Y2=OC2*23:PUT(310,Y2),BALL,XOR
  230.      RETURN
  231. 4300 on oc2 goto 4301,4302,4303,4304,4305,4306,4307,4308
  232. 4301 palapg=0:if pala%=30 then pala%=20:put(px,182),palag:put(px,182),palap:return
  233.      if disp=0 then return else disp=0:put(px,179),disparo:put(px,182),palap:return
  234. 4302 if pala%=30 then return
  235.      palapg=0:if PALA%=20 then pala%=30:if disp=0 then put(px,182),palap else disp=0:put(px,179),disparo
  236.      if PX=>211 then px=oldpx-5:oldpx=px:put(px,182),palag:return else put(px,182),palag:return
  237. 4303 palapg=1:if pala%=30 then pala%=20:put(px,182),palag:put(px,182),palap:return
  238.      if disp=1 then disp=0:put(px,179),disparo:put(px,182),palap:return else return
  239. 4304 palapg=0:if disp=1 then return
  240.      IF PALA%=20 THEN PUT(PX,182),PALAP ELSE PUT(PX,182),PALAG
  241.      PUT(PX,179),DISPARO:DISP=1:pala%=20:RETURN
  242. 4305 IF PASOPANT=1 THEN RETURN
  243.      pasopant=1:PUT(99,26),RAYO,PSET:put(189,26),rayo,pset:goto 4301
  244. 4306 final%=(3800-((nivel-1)*1000))-(1100*(repe-1)):goto 4301
  245. 4307 puntos&=puntos&+2500:goto 4301
  246. 4308 nballs=nballs+1:gosub 900:goto 4301
  247.  
  248. '  COMPROBAR SI PASA DE PANTALLA CON RAYO O NO
  249. 4400 IF (BX(W)=>99 AND BX(W)+5=<99+33) OR (BX(W)=>189 AND BX(W)+5=<189+33) THEN PUNTOS&=PUNTOS&+(NBRKS*5):GOSUB 900:PASOPANT=0:N=N+2:RETURN 140
  250.      RETURN
  251.  
  252. '  SABER CON QUE NIVEL DESEA JUGAR
  253. 4500 NBALLS=5:NIVEL=1:X=72:X2=114:GET(X,2)-(X2,16),NIVEL:PUT(X,2),NIVEL,PRESET
  254. 4501 A$=INKEY$:IF A$="" THEN GOTO 4501
  255. 4502 IF A$=IZQUIERDA$ THEN IF X>72 THEN X=X-45:X2=X2-45:PUT(X+45,2),NIVEL,PSET ELSE GOTO 4501 else goto 4503
  256.      NIVEL=NIVEL-1:nballs=nballs+1:GET(X,2)-(X2,16),NIVEL:PUT(X,2),NIVEL,PRESET
  257. 4503 IF A$=DERECHA$ THEN IF X<72+(45*A) THEN X=X+45:X2=X2+45:PUT(X-45,2),NIVEL,PSET ELSE GOTO 4501 else goto 4504
  258.      NIVEL=NIVEL+1:nballs=nballs-1:GET(X,2)-(X2,16),NIVEL:PUT(X,2),NIVEL,PRESET
  259. 4504 IF A$<>PARAR$ THEN GOTO 4501
  260.      IF NIVEL=4 THEN DEMO=1:A=2:GOTO 4500
  261.      RETURN
  262.  
  263. ' DEMO
  264. 4600 if tocado=2 then goto 4602
  265. 4601 IF REPE>1 THEN IF By(2)>=95 THEN A=2 ELSE IF By(3)>=95 THEN A=3 else a=1 else a=1
  266.      IF BX(A)<PX+12 THEN PXINC=-5:return
  267.      IF BX(A)>PX+12 THEN PXINC=5:return
  268.      PXINC=0:return
  269. 4602 if sgn(byinc(w))=1 then goto 4601
  270.      if movx<px+12 then pxinc=-5:return
  271.      if movx>px+12 then pxinc=5:return
  272.      pxinc=0:return
  273.  
  274. '   SI TOCA MAYESC
  275. 4700 CHAIN "BLOCKS.EXE"
  276.  
  277. '     D A T A S  PARA DIBUJAR PANTALLAS
  278. 5000 DATA "1111111113-3+-3+-3+-3+"
  279.      DATA "0+3333003+03333333300333113330003311330000111111000011111100003311330003331133303333003333"
  280.      DATA "3-33-333-3333-33333-333333-3333333-33333333-111111111--"
  281.      DATA "3332+300000000230333111022030000102203033010220103303022010000302201113330320000000032222222333"
  282.      DATA "-2010220102202022020210200002010020330200102000020120202202022010220102-1000330001"
  283.      DATA "0001111000033233233003010010301211001121130022003113002200311211001121030100103003323323300001111000"
  284.      DATA "1022221121102333112310231311231023132221101111112200000001220222002132000333233211033323321102222312"
  285.      DATA "-12021120210202112020020211202002122221200212222120020211202002021120201202112021"
  286.      DATA "1+003333330000033330000000330000022222222002222222200000330000000333300000333333001+"
  287.      DATA "2000000002000111100000133331000133333310013322331001332233100133333310001333310000011110002000000002"
  288.      DATA "--3+22222222333+3+332+3+3+2222222233"
  289.      DATA "002+-222222222333000000233301111023320122102332012210233201111033320000003332+"
  290.      DATA "2222002+-02133331200212222120021111112003331133300332112330021211212002122221200211111120"
  291.      DATA "2222222220233323332023332333201323132310132313231013231323102323232320233323332023332333202222222220"
  292.      DATA "3100220013131022013101310013100013113100220122102222012210220013113100013100131013102201313100220013"
  293.      DATA "2+3+311111111332333333233232112323323211232332333333233231111113323+32+"
  294.      DATA "1+-23321123322332002332233200233223320023322332002332233200233221120021122222002222"
  295.